package gui;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.swing.JOptionPane;

public class FileIO {

	public static BufferedImage f(String filename){
		try {
			return ImageIO.read(new File(filename));
		} catch (IOException e) {
			JOptionPane.showMessageDialog(null, e.getMessage(), "Missing file", JOptionPane.ERROR_MESSAGE);
		}
		return null;
	}
}
